class Solution {
public:
	int findComplement(int num) {
		int ret = 0;
		int i = 0;
		while (num)
		{
			if ((num & 1) == 0)
				ret |= (1 << i);
			num >>= 1;
			i++;
		}
	}
		return ret;
};